package com.tools.service.workflow;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tools.pojo.workflow.po.FlowTransition;

import java.util.List;

public interface FlowTransitionService extends IService<FlowTransition> {
    /**
     * 根据流程定义ID获取所有连线
     */
    List<FlowTransition> getTransitionsByFlowDefinitionId(Long flowDefinitionId);
    /**
     * 根据源节点获取所有出线
     */
    List<FlowTransition> getOutTransitions(Long flowDefinitionId, String sourceNode);
    /**
     * 根据目标节点获取所有入线
     */
    List<FlowTransition> getInTransitions(Long flowDefinitionId, String targetNode);
    /**
     * 获取默认连线（无条件连线）
     */
    FlowTransition getDefaultTransition(Long flowDefinitionId, String sourceNode);
    /**
     * 根据源节点获取所有条件连线
     */
    List<FlowTransition> getConditionTransitions(Long flowDefinitionId, String sourceNode);
}
